<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .header{
            width: 1200px;
            height: 40px;
            background-color: rebeccapurple;
            margin: 30px auto;
        }
        .tab{
            width: 200px;
            text-align: center;
            line-height: 40px;
            margin: 0 20px;
            background-color: royalblue;
            float: left;
        }
        .content{
            width: 1200px;
            height: 500px;
            background-color: rebeccapurple;
            margin: 30px auto;
            border: 20px blueviolet solid;
        }
        .item{
            width: 1200px;
            height: 500px;
            background-color: rgb(223, 216, 230);
            margin: 30px auto;
            display: none;
        }
        .item:nth-child(1){
            display: block;
        }
        .bg{
            background-color: red;
        }
    </style>
</head>
<body>
    <div class="header">
        <div class="tab">1</div>
        <div class="tab">2</div>
        <div class="tab">3</div>
    </div>
    <div class="content">
        <div class="item">1111</div>
        <div class="item">2222</div>
        <div class="item">3333</div>
    </div>
</body>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script>
    $(".tab").click(function(){
        $(this).addClass("bg").siblings().removeClass("bg");
        var i = $(this).index()
        $(".item").eq(i).show().siblings().hide()
    })

</script>
</html>